package com.linoer.cloud.alo.businessserver.controller;

import com.linoer.cloud.alo.businessserver.service.BusinessService;
import com.linoer.cloud.alo.common.domain.ObjectResponse;
import com.linoer.cloud.alo.common.domain.dto.BusinessDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Classname BusinessController
 * @Description TODO
 * @Date 2021/6/25 10:58 上午
 * @Created by muhenglv
 */
@RestController
@RequestMapping("/business")
public class BusinessController {

    @Autowired
    private BusinessService businessService;

    @PostMapping("/purchase")
    public ObjectResponse purchase(@RequestBody BusinessDTO businessDTO){
        return businessService.purchase(businessDTO);
    }

    @PostMapping("/purchaseError")
    public ObjectResponse purchaseError(@RequestBody BusinessDTO businessDTO){
        return businessService.purchaseError(businessDTO);
    }
}
